Connecting to the CSUSB JupyterHub Server

Updated: 10-05-2022

Required items

We need to the followings.

  1. (Server) A running container.

  2. (Server) A valid token, see below.

  3. (Local) VS-code with the Jupyter extension installed.

For item 1, see xxx, and for item 3, see xxx.

Below, we will explain how to generate a token and how to connect to the CSUSB JupyterHub using the token.

Generate a JupyterLab Token

  1. Click on the File tab.

    Alternative text
  2. Select Hub Control Panel.

  3. Click on Token.

    Alternative text
  4. You may assign any name for your token.

    Alternative text

    Note

    Tokens are more or less your password. Anyone having your token can access your server. Do not share this information in public. If not sure, revoke it when done.

Connect to a remote server

  1. Open your VS-Code.

  2. Open an ipynb file.

  3. Use !hostname to check your current kernel. Currently, it is local.

    Alternative text
  4. Open the palette and type Jupyter:; see how to here https://docs.github.com/en/codespaces/codespaces-reference/using-the-vs-code-command-palette-in-codespaces.

    Alternative text
  5. Choose Jupyter: Specify Jupyter Server for Connections.

  6. Choose Existing

    Alternative text
  7. Type the following in the box https://csusb-jupyter.nrp-nautilus.io/user/<your email address>?token=<your token>.

    Alternative text

    Note

    For the first type of the URI, you can copy it from CSUSB JupyterHub. In your server, click the URL box and copy the necessary part.

    Alternative text
  8. Lastly, run !hostname to check the current kernel. If it is still connected to the last one, see the following images.

    Alternative text

Click on the current kernel, in the photo it is main (Python 3.9.13) located at the upper right corner.

Alternative text

Now, choose the (Remote) Jupyter Kernel

Alternative text

We are good to go.